<?PHP
  $current_page = "user_delete_response.php";
  $page_type = "A";
  require_once 'header.php';
  
  $user_id = $_POST["user_id"];

  // Delete the specified user account
  $sql = "delete from USER_ACCT where UserId='$user_id'";

  $result_array = execute_sql_in_oracle($sql);
  $result = $result_array["flag"];
  $cursor = $result_array["cursor"];

  if (!$result){
    $delete_error = 'User account('."<b><font color=\"black\">".$user_id."</font></b>".') deletion failed!';
    header("Location:user.php?delete_error=$delete_error");
  }
  else {
    // Account deleted, redirect to user.php
    $delete_success = 'User account('."<b><font color=\"black\">".$user_id."</font></b>".') deleted successfully!';
    header("Location:user.php?delete_success=$delete_success");
  }
?>